package com.cyt.sys.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 系统模块-新闻实体类
 *
 * @author shengQiang Yu
 * @date 2019-4-4 15:41:46
 */
@Data
@NoArgsConstructor
@Table(name = "base_news")
public class BaseNews implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;
	/**
     * 新闻标题
     */ 
	@Column(name = "title")
	private String title;
	/**
     * 有效状态:1、正常，2、无效
     */ 
	@Column(name = "status")
	private String status;
	/**
     * 排序
     */ 
	@Column(name = "sort")
	private String sort;
	/**
     * 删除标注:1、正常，2、删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;
	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;
	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;
	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;
	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author shengQiang Yu
	 * @date 2019-4-4 15:41:46
	 */
	public BaseNews(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}